package kr.co.mcshop.reviewComment;

import java.util.List;
import java.util.Map;

import kr.co.mcshop.qnacomment.QnACommentMapper;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ReviewCommentService {

	@Autowired
	private SqlSession sqlSession;
	
	public List<ReviewComment> getAllComment(Map map){
		ReviewCommentMapper comment=sqlSession.getMapper(ReviewCommentMapper.class);
		return comment.getAllComment(map);
	}
	public int insertComment(Map map){
		ReviewCommentMapper comment=sqlSession.getMapper(ReviewCommentMapper.class);
		return comment.insertComment(map);
	}
	public int deleteComment(Map map){
		ReviewCommentMapper comment=sqlSession.getMapper(ReviewCommentMapper.class);
		return comment.deleteComment(map);
	}	
	public int deletereviewComment(Map map){
		ReviewCommentMapper comment=sqlSession.getMapper(ReviewCommentMapper.class);
		return comment.deletereviewComment(map);
	}
	
	public int deletereviewcomment(Map map){
		ReviewCommentMapper comment=sqlSession.getMapper(ReviewCommentMapper.class);
		return comment.deletereviewcomment(map);
	}
	public int updatereviewcomment(Map map) {
		ReviewCommentMapper comment = sqlSession.getMapper(ReviewCommentMapper.class);
		return comment.updatereviewcomment(map);
	}
}
